package com.minelx.statementplus.ui.form.vo;

import java.util.Objects;

public class ChildSqlBuilderPairValue {
	private final String name;

	private final String childSql;

	public ChildSqlBuilderPairValue(String name, String childSql) {
		this.name = name;
		this.childSql = childSql;
	}

	public String name() {
		return name;
	}

	public String childSql() {
		return childSql;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		ChildSqlBuilderPairValue that = (ChildSqlBuilderPairValue) o;
		return name.equals(that.name) && childSql.equals(that.childSql);
	}

	@Override
	public int hashCode() {
		return Objects.hash(name, childSql);
	}

	@Override
	public String toString() {
		return "ChildSqlBuilderPairValues{" +
				"name='" + name + '\'' +
				", childSqlBuilder=" + childSql +
				'}';
	}
}
